CREATE TABLE [dbo].[MedicalProcedure]
(
[ProcedureCode] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ProcedureDescription] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DrCode] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SubCategoryID] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UnitPrice] [decimal] (12, 2) NOT NULL CONSTRAINT [DF_Procedure_ProcedureCost] DEFAULT ((0)),
[AllowCustom] [bit] NOT NULL CONSTRAINT [DF_Procedure_AllowInputDetail] DEFAULT ((0)),
[AllowBlankDrCode] [bit] NOT NULL CONSTRAINT [DF_MedicalProcedure_AllowCustom1] DEFAULT ((0)),
[Remark] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UpdateDate] [datetime] NOT NULL CONSTRAINT [DF_MedicalProcedure_UpdateDate] DEFAULT (getdate()),
[CreateUser] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_MedicalProcedure_CreateDate] DEFAULT (getdate()),
[UpdateUser] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MedicalProcedure] ADD CONSTRAINT [PK_Procedure] PRIMARY KEY CLUSTERED  ([ProcedureCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MedicalProcedure] ADD CONSTRAINT [FK_Procedure_ProcedureSubCategory] FOREIGN KEY ([SubCategoryID]) REFERENCES [dbo].[ProcedureSubCategory] ([SubCategoryID])
GO
